package com.qrpay.model;

public enum ErrorCode implements BaseModel {
    SYSTEM_SUCCESS("0000", "成功"),
    SYSTEM_FAILED("0001", "系统处理失败！"),


    USER_NOT_REGISTER("0100", "用户没有注册"),
    USER_HAS_REGISTER("0101", "该用户已注册"),
    USER_PASSWORD_ERROR("0102", "用户密码错误"),
    USER_LEVEL_CANNOT_INVITE("0103", "用户的所处层级不允许再发送邀请"),
    USER_FEE_TYPE_UNEQUAL_PARENT("0104", "用户收费类型与父级用户不同"),
    USER_FEE_CANNOT_LESS_THAN_PARENT("0104", "用户手续费不能低于父级用户"),

    PARAMS_ERROR("0200", "参数错误"),
    SIGN_ERROR("0201", "签名异常"),
    VERIFY_SIGN_ERROR("0202", "验签失败"),
    ILLEGAL_TRADE("0203", "非法交易"),
    INVALID_ORDER("0204", "无效订单"),
    CASH_BALANCE_NOT_ENOUGH("0205", "现金账户余额不足"),
    USER_PROVIDER_CONFIG_ERROR("0206", "用户渠道配置出错"),
    USER_PROVIDER_IS_CLOSED("0207", "用户渠道已关闭"),
    USER_VIP_EXPIRED("0208", "用户Vip已过期"),
    USER_NOT_ALLOW_BUY_VIP("0209", "该用户不允许购买Vip"),
    EXCEED_USER_PROVIDER_DAILY_LIMIT("0210", "超出用户渠道每日限额"),
    USER_PROVIDER_NOT_ENABLE("0211", "用户该渠道不在有效期"),
    USER_CUR_VIP_PACKAGE_IS_NULL("0212", "用户当前没有相关联的Vip"),
    ILLEGAL_UPDATE_VIP_PACKAGE("0213", "不合法的变更Vip请求"),

    DB_INSERT_ERROR("0300", "数据库增加异常"),
    DB_DELETE_ERROR("0301", "数据库删除异常"),
    DB_SELECT_ERROR("0302", "数据库查询异常"),
    DB_UPDATE_ERROR("0303", "数据库更新异常"),


    CHANNEL_UNSUPPORTED_CURRENCY("0401", "渠道不支持的币种"),
    ;

    private final String code;
    private final String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
